<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml" xsl:version="1.0"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:sparql="http://www.w3.org/2005/sparql-results#"
    exclude-result-prefixes="sparql">
<head>
    <title>
        <xsl:value-of select="sparql:sparql/sparql:results/sparql:result[1]/sparql:binding[@name='label']/*" />
        <xsl:text> Discussion</xsl:text>
    </title>
    <link rel="help" href="../../callimachus-for-web-developers#Discussion_tab" target="_blank" title="Help" />
    <style>
        .thread { padding: 0px; }
        .note { list-style: none; margin-bottom: 1em; padding: 0.5ex; }
        .note div.ui-corner-top { font-size: small; padding: 1ex; min-height: 16px; line-height: 16px; vertical-align: middle; }
        .note .comment { padding: 0px 1ex; }
        .note .post { padding: 1ex; }
    </style>
</head>
<body>
    <h1>
        <xsl:value-of select="sparql:sparql/sparql:results/sparql:result[1]/sparql:binding[@name='label']/*" />
        <xsl:text> Discussion</xsl:text>
    </h1>
    <p>The purpose of this forum is to provide space for editors to discuss changes to this resource, post reminders of editorial work still to be done, or warnings in the event that future changes to this resource that might be made. This should not be used by editors for their personal views on a subject.</p>
    <ul class="list-unstyled thread">
        <xsl:for-each select="sparql:sparql/sparql:results/sparql:result[sparql:binding/@name='note']">
            <li class="note">
                <div class="ui-state-default ui-corner-top" >
                    <time class="abbreviated" style="float: right">
                        <xsl:value-of select="sparql:binding[@name='modified']/*" />
                    </time>
                    <span class="ui-icon ui-glyphicon glyphicon-comment" style="float: left"></span>
                    <a href="{sparql:binding[@name='user']/*}">
                        <xsl:value-of select="sparql:binding[@name='name']/*" />
                    </a>
                </div>
                <div class="comment ui-widget-content ui-corner-bottom">
                    <pre class="wiki">
                        <xsl:value-of select="sparql:binding[@name='note']/*" />
                    </pre>
                </div>
            </li>
        </xsl:for-each>
        <li class="note hidden-logout">
            <div class="ui-state-active ui-corner-top" >
                <span class="ui-icon ui-glyphicon glyphicon-comment" style="float: left"></span>
                <xsl:text>Post a new note</xsl:text>
            </div>
            <div class="post ui-widget-content ui-corner-bottom">
                <form role="form" action="?discussion" method="POST">
                    <div>
                        <textarea class="auto-expand" name="note"></textarea>
                    </div>
                    <button id="send" type="submit" class="btn btn-primary">Send</button>
                    <xsl:text> </xsl:text>
                    <button id="cancel" type="button" onclick="window.location.replace('?discussion')" class="btn btn-default">Cancel</button>
                </form>
            </div>
        </li>
    </ul>
</body>
</html>
